import pymysql
db = pymysql.connect(host='localhost',
                     user='root',
                     password='123456',
                     database='renren_fast')
					 
 
cursor = db.cursor()
 
cursor.execute("SELECT VERSION()")
 
data = cursor.fetchone()
 
print ("Database version : %s " % data)
 
db.close()







